import os
def getFiles(dir,suffix):
    res = []
    for root,directory,files in os.walk(dir):
        for filename in files:
            name,suf=os.path.splitext(filename)
            if suf == suffix:
                res.append(os.path.join.(root,filename))
    return res
for file in getFiles("./",'.py'):
    print(file)
